package org.chaiyi.template.contract.demo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.chaiyi.template.core.common.repository.MongoEntity;
import org.chaiyi.template.core.common.util.Base58UUID;

import java.time.LocalDateTime;

@Data
public class Demo implements MongoEntity {
    private String id;

    @Schema(title = "姓名")
    private String name;

    private LocalDateTime createTime;

    public String collectionName() {
        return "demo";
    }

    public Demo() {
        this.id = Base58UUID.id();
        this.createTime = LocalDateTime.now();
    }
}
